package com.itstyle.modules.weixinpay.controller;

import com.itstyle.common.model.Product;
import com.itstyle.modules.weixinpay.entity.TestStudentEntity;
import com.itstyle.modules.weixinpay.service.IWeixinPayService;
import com.itstyle.modules.weixinpay.service.TestStudentDBService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * 测试入库
 */
@Api(tags ="测试入库")
@Controller
@RequestMapping(value = "weixinpaydb")
public class TestController {
    private static final Logger logger = LoggerFactory.getLogger(TestController.class);
    @Autowired
    private TestStudentDBService testStudentDBService;
   // @ApiOperation(value="二维码支付(模式一)根据商品ID预先生成二维码")
    @RequestMapping(value="testdb",method= RequestMethod.POST)
    @ResponseBody
    public String  testdb(TestStudentEntity entiey,ModelMap map) {
        logger.info("入库开始");
        testStudentDBService.insertTestStudent(entiey);
        logger.info("入库结束");
        return "weixinpay/qcpay";
    }
}
